<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="../taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../css/four.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../css/jqe/themes/default/easyui.css"/>
	<link rel="stylesheet" type="text/css" href="../css/jqe/themes/icon.css"/>

    <script type="text/javascript" src="../js/jquery-3.1.1.min.js"></script>
	<script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript">
    $(function(){
    	//初始化对话框
    	 $('#dw,#dwEdit').window({
    		   onBeforeClose:function(){ 
    			   //取消时关闭等待框
    			   setTimeout(function(){ 
    				   sending.style.visibility = "hidden";
				   }, 250);
    	   }});
    	
   
          $(".btnAll").each(function(i,v){
    	   //变手型
    	     $(v).mouseover(function() {
				$(this).css("cursor", "hand");
			 }).mouseout(function() {
				$(this).css("cursor", "pointer");
			 });
    	   
    	   
    	   if($(v).html()=='【新增】'){
    		   $(v).click(function(){
    			   $('#dw').window("open");
    			   
    		   });
    	   }else if($(v).html()=='【编辑】'){
      		   $(v).click(function(){
      			  
      			   location.href="toUpGw.do?jygwid="+$(v).prop("lang");
     
      		   });
    	   }else if($(v).html()=='【删除】'){
    		   $(v).click(function(){
    			  if(confirm("确认删除'"+$(v).prop("title")+"'?")){
    				  location.href="delGw.do?jygwid="+$(v).prop("lang"); 
    			  }
    		   });
    	   } 
       });
       
         $(".sel_sbid").change(function(){
        	
        	location.href="listS.do?sbid="+$(".sel_sbid").val();
         });
          
          
    });
    </script>
</head>
<body>
	<!-- 包含等待框 -->
	<jsp:include page="../waittable.jsp" flush="true" />
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr valign="top">
			<td bgcolor="#FFFFFF"><table width="96%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#aec3de">
					<tr align="left" bgcolor="#F2FDFF">
						<td colspan="7" class="optiontitle">
						企业岗位需求表</td>
					</tr>
					<tr align="center">
						<td align="center" bgcolor="#ebf0f7">需求岗位ID</td>
						<td align="center" bgcolor="#ebf0f7">企业名称</td> 
						<td align="center" bgcolor="#ebf0f7">需要岗位</td>
						<td align="center" bgcolor="#ebf0f7">需要人数</td>
						<td align="center" bgcolor="#ebf0f7">需求岗位发布时间</td>
						<td align="center" bgcolor="#ebf0f7">需求岗位结束时间</td>
						<!-- <td align="center" bgcolor="#ebf0f7">习题推荐答案</td> -->
						<!-- <td align="center" bgcolor="#ebf0f7">习题备注</td> -->
						<td align="center" bgcolor="#ebf0f7">操作 <span class="btnAll">【新增】</span> </td>
					</tr>
					<c:forEach items="${page.results}" var="gw">
						<tr align="center" bgcolor="#FFFFFF">
						    <td align="center" bgcolor="#ebf0f7">${gw.jygwid}</td>
							 <td align="center">${gw.jyname}</td> 
							<td align="center">${gw.jygwName}</td>
							<td align="center">${gw.jygwnum}</td>
							<td align="center"><fmt:formatDate value="${gw.jygwbegindate}" pattern="yyyy-MM-dd"/></td>
							<td align="center"><fmt:formatDate value="${gw.jygwenddate}" pattern="yyyy-MM-dd"/></td>
							<td align="center">
							【<a href="oneGw.do?jygwid=${gw.jygwid}">查看</a>】
									| <span class="btnAll" lang="${gw.jygwid}">【编辑】</span>
								    | <span class="btnAll" lang="${gw.jygwid}" title="${gw.jyname}公司岗位需求记录">【删除】</span>
				               
							</td>
						</tr>
					</c:forEach>
					<tr align="right" bgcolor="#ebf0f7">
							<td colspan="7">
							<jk:page totalPage="${page.totalPage}" pageNo="${page.pageNo}" totalRecord="${page.totalRecord}"
                                url="listGw.do"/>
							</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
		  <td align="center" style="color: red">${msg}</td>
		</tr>
	</table>
	<br />
    
	<div id="dw" class="easyui-window" title="新增岗位需求表" data-options="modal:true,minimizable:false,closed:true,maximizable:false,iconCls:'icon-save'" style="width:370px;height:350px;padding:10px;display: none;">
		<form action="addGw.do" method="post">
		    企业名称：
		   <select name="jyid">
		   <c:forEach items="${gss}" var="gs">
		   <option value="${gs.jyid }">${gs.jyname }</option>
		   </c:forEach>
		  </select><br /><br />
		     指导老师：&nbsp
		  <select name="eid">
		  <c:forEach items="${emps}" var="emp">
		  <option value="${emp.eid }">${emp.ename }</option>
		  </c:forEach>
		  </select><br /><br />
		    需要岗位：<input name="jygwName"/><br /><br />
		    需要人数：<input name="jygwnum"/><br /><br />
		    待遇下限：<input name="jygwmin"/><br /><br />
		    待遇上限：<input name="jygwmax"/><br /><br /> 
		    发布时间 ：<input name="jygwbegindate"   onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" /><br /><br />
		    结束时间 ：<input name="jygwenddate"   onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" /><br /><br />
		    岗位描述：<textarea rows="2" cols="30" name="jygwdescb" ></textarea><br /><br />
		    特别要求：<textarea rows="2" cols="30" name="jygwbeizhu"></textarea><br /><br />
		    岗位备注：<textarea rows="2" cols="30" name="jygwbeizhu2"></textarea><br /><br />
		  <input type="submit" value="保存"/><br />
		</form>
	</div>
	
	 <div id="dwEdit" class="easyui-window" title="修改岗位需求表" data-options="modal:true,minimizable:false,closed:true,maximizable:false,iconCls:'icon-save'" style="width:380px;height:370px;padding:10px;display: none;">
		<form action="upSc.do" method="post">
		<input name="jygjID" id="upd_jygjID" type="hidden"/>
		  企业名称：
		   <select name="jyid" id="upd_jyid">
		   <c:forEach items="${gss}" var="gs">
		   <option value="${gs.jyid }">${gs.jyname }</option>
		   </c:forEach>
		  </select><br /><br />
		    跟  进  人：&nbsp
		  <select name="eid" id="upd_eid">
		  <c:forEach items="${emps}" var="emp">
		  <option value="${emp.eid }">${emp.ename }</option>
		  </c:forEach>
		  </select><br /><br />
		   
		    跟进内容：<textarea rows="2" cols="30" name="jygjcontent" id="upd_jygjcontent"></textarea><br /><br />
		    跟进反馈：<textarea rows="2" cols="30" name="jygjresult" id="upd_jygjresult"></textarea><br /><br />
		      <input type="submit" value="保存"/><br>
		</form>
	</div>
	
</body>
</html>